import scrapy


class HtmlSpider(scrapy.Spider):
    name = 'html'
    #allowed_domains = ['www.xyyuedu.com']
    start_urls = ['https://www.xyyuedu.com/gdmz/sidamingzhu/hlmeng/21651.html']

    def parse(self, response):
        name=response.url.split('/')[-1]
        with open(name,'wb')as f:
            f.write(response.body)
            self.log('Saved file %s.'%name)
